/*
* @Author: tomystery
* @Date:   2017-09-14 17:12:02
* @Last Modified by:   tomystery
* @Last Modified time: 2017-10-06 18:19:28
*/
'use strict';

var _mm = require('util/mm.js');
var _order={
	//获取地址列表
    getProductList:function(resolve,reject){
    	_mm.request({
    		url:_mm.getServerUrl('/order/get_order_cart_product.do'),
    		success:resolve,
    		error:reject
    	});
    },
    //提交订单
    createOrder:function(orderInfo,resolve,reject){
    	_mm.request({
    		data:orderInfo,
    		url:_mm.getServerUrl('/order/create.do'),
    		success:resolve,
    		error:reject
    	});
    },
    //获取订单列表商品信息
    getOrderList:function(pageInfo,resolve,reject){
        _mm.request({
            data:pageInfo,
            url:_mm.getServerUrl('/order/list.do'),
            success:resolve,
            error:reject
        });

    },
     //获取订单列表商品信息
    getOrderDetail:function(orderNumber,resolve,reject){
        _mm.request({
            data:{
                orderNo:orderNumber
            },
            url:_mm.getServerUrl('/order/detail.do'),
            success:resolve,
            error:reject
        });

    },
     //取消订单列表商品信息
    orderCancel:function(orderNumber,resolve,reject){
        _mm.request({
            data:{
                orderNo:orderNumber
            },
            url:_mm.getServerUrl('/order/cancel.do'),
            success:resolve,
            error:reject
        });

    }
}

    
module.exports = _order;